<template>
  <div class="g-box">
    <div class="header flex between">
      <div>
        <h2 class="header_title">{{ props.title }}</h2>
        <slot name="center"> </slot>
      </div>
      <div class="header_subtitle">
        <a class="link" href="">
          <a :href="props.target"> {{ props.subTitle || '更多' }}</a>
        </a>
        <SvgIcon icon="icon-xiangyou"></SvgIcon>
      </div>
    </div>
    <slot name="main"> </slot>
  </div>
</template>

<script lang="ts">
export default {
  name: '',
}
</script>

<script lang="ts" setup>
import { ref, reactive } from 'vue'
import SvgIcon from '../SvgIcon/index.vue'

const props = defineProps<{
  title: string
  subTitle?: string
  target?: string
}>()
</script>

<style scoped>
.header {
  height: 35px;
  line-height: 30px;
  border-bottom: 2px solid #c10d0c;
}
.header_title {
  font-size: 20px;
  font-weight: 400;
}
.header_title::before {
  content: '';
  display: inline-block;
  padding-left: 15px;
  height: 15px;
  width: 15px;
  background: url('@/assets/logo/3.png') no-repeat center;
}
.header_subtitle {
  font-size: 12px;
  color: #666;
  line-height: 35px;
}
.link:hover {
  text-decoration: underline;
}
</style>
